package jmine.tec.extensions.impl.forms.server;

import jmine.tec.services.annotations.Input;
import jmine.tec.services.annotations.ServiceImplementor;
import jmine.tec.services.api.ActionsEnum;
import jmine.tec.services.api.export.ReferenceMap;
import jmine.tec.services.api.export.ServiceFiller;
import jmine.tec.services.export.impl.ExportUtils;
import jmine.tec.services.io.ServiceBean;

@ServiceImplementor(action = ActionsEnum.INCLUIR)
public class MockBoletaService implements ServiceFiller<MockBoletaService> {

    protected static final String COLUMN_NAME = "A column name";

    private String aString;

    /**
     * @return the aString
     */
    public String getaString() {
        return this.aString;
    }

    /**
     * @param aString the aString to set
     */
    @Input(fieldName = COLUMN_NAME)
    public void setaString(String aString) {
        this.aString = aString;
    }

    public void fillServiceBean(ServiceBean bean, ReferenceMap referenceMap, MockBoletaService entity) {
        ExportUtils.setService(bean, this.getClass());
        ExportUtils.put(bean, MockBoletaService.COLUMN_NAME, entity.getaString());
    }
}